//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopGoodsService, MinishopGoodsServiceResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopGoodsServiceList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopGoodsServiceResponse>(`/uctoo/minishop_goods_service/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopGoodsService = async (id: string) => {
  return requestClient.get<MinishopGoodsService>(`/uctoo/minishop_goods_service/${id}`);
};

export const adductooMinishopGoodsService = async (data: Partial<MinishopGoodsService>) => {
  return requestClient.post<MinishopGoodsService>('/uctoo/minishop_goods_service/add', data);
};

export const edituctooMinishopGoodsService = async (data: Partial<MinishopGoodsService>) => {
  return requestClient.post<MinishopGoodsService>('/uctoo/minishop_goods_service/edit', data);
};

export const deleteuctooMinishopGoodsService = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_goods_service/del', { id });
};
